//
//  MTClubRichListModel.swift
//  MT
//
//  Created by ooops on 2019/12/25.
//  Copyright © 2019 张强. All rights reserved.
//

import Foundation
import ObjectMapper
import MTCategory


class MTClubRichListModel: Mappable {
    
    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?
    
    var result: [MTClubRichListResultModel]?
    
    var clubInfo: MTClubRichListResultModel?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
        clubInfo  <- map["result"]
    }
}

class MTEditClubInfoModel: Mappable {
    
    /// 请求是否成功的code
    var code: Int?
    /// 请求返回的Message
    var message: String?
    /// 分页对象
    var page: PageModel?
    /// 时间戳
    var timestamp: TimeInterval?
    
    var result: MTClubRichListResultModel?
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        code    <- map["code"]
        message <- map["message"]
        page <- map["page"]
        timestamp <- map["timestamp"]
        result  <- map["result"]
    }
}

class MTClubRichListResultModel: Mappable {
    
    /// 排行
    var number: Int?
    /// 是否加入已经加入俱乐部
    var joined: Bool?
    /// 俱乐部名称
    var name: String?
    /// 俱乐部地区
    var province: String?
    /// 极光群ID
    var pushId: Int?
    /// 群人数
    var userTotal: Int?
    /// 图片 - 群图片展示
    var imgList: [String]?
    /// 主键
    var id: Int?
    /// 已发钻石
    var exportMoney: Int?
    /// 这才是已发钻石
    var consumeMoney: Int?
    
    var city: String?
    
    var area: String?
    /// 俱乐部头像地址
    var href: String?
    /// 红包金额
    var redPacketMoney: Int?
    /// 每日自动发送红包数量
    var redPacketNum: Int?
    /// 红包发放时间
    var redPacketSendTime: String?
    /// 发布者极光Id
    var userName: String?
    /// 俱乐部描述
    var remark: String?
    
    var neesRebuildAvator: Bool = false
    
    
    required public init?(map: Map) {
        
    }
    
    func mapping(map: Map) {
        joined        <- map["joined"]
        name        <- map["name"]
        province        <- map["province"]
        pushId        <- map["pushId"]
        userTotal        <- map["userTotal"]
        imgList        <- map["imgList"]
        id        <- map["id"]
        exportMoney        <- map["exportMoney"]
        consumeMoney       <- map["consumeMoney"]
        href        <- map["href"]
        redPacketMoney       <- map["redPacketMoney"]
        redPacketNum        <- map["redPacketNum"]
        redPacketSendTime       <- map["redPacketSendTime"]
        city       <- map["city"]
        area       <- map["area"]
        remark       <- map["remark"]
    }
}
